<template>
  <view class="flex-table">
    <view class="flex-tr">
      <view class="flex-td--label">作业申请单位</view>
      <view class="flex-td--value flex-center">{{ ticket.applyUnitName }}</view>
      <view class="flex-td--label">作业单位</view>
      <view class="flex-td--value flex-center">{{ ticket.unitName }}</view>
      <view class="flex-td--label">作业申请时间</view>
      <view class="flex-td--value flex-center">{{
        $u.timeFormat(ticket.createTime, 'yyyy 年 mm 月 dd 日 hh 时 MM 分')
      }}</view>
    </view>
    <view class="flex-tr">
      <view class="flex-td--label">吊装地点</view>
      <view class="flex-td--value flex-center">{{ detail.workLocation }}</view>
      <view class="flex-td--label">吊具名称</view>
      <view class="flex-td--value flex-center">{{ detail.toolName }}</view>
      <view class="flex-td--label">吊装内容</view>
      <view class="flex-td--value flex-center">{{ ticket.workContent }}</view>
    </view>
    <view class="flex-tr">
      <view class="flex-td--label">吊装作业人</view>
      <view class="flex-td--value" style="display: block">
        <image
          v-for="imgItem in operatorAcceptConfessionsSignatures"
          :key="imgItem"
          :src="`${staticUrl}${imgItem}`"
          mode="aspectFill"
          class="signature__img"
          @click="handlePreviewImage(`${staticUrl}${imgItem}`, operatorAcceptConfessionsSignatures)"
        ></image>
      </view>
      <view class="flex-td--label">司索人</view>
      <view class="flex-td--value" style="display: block">
        <image
          v-for="imgItem in riggerSignatures"
          :key="imgItem"
          :src="`${staticUrl}${imgItem}`"
          mode="aspectFill"
          class="signature__img"
          @click="handlePreviewImage(`${staticUrl}${imgItem}`, riggerSignatures)"
        ></image>
      </view>
      <view class="flex-td--label">监护人</view>
      <view class="flex-td--value" style="display: block">
        <image
          v-for="imgItem in guardianSignatures"
          :key="imgItem"
          :src="`${staticUrl}${imgItem}`"
          mode="aspectFill"
          class="signature__img"
          @click="handlePreviewImage(`${staticUrl}${imgItem}`, guardianSignatures)"
        ></image>
      </view>
    </view>
    <view class="flex-tr">
      <view class="flex-td--label">指挥人员</view>
      <view class="flex-td--value" style="display: block">
        <image
          v-for="imgItem in directorSignatures"
          :key="imgItem"
          :src="`${staticUrl}${imgItem}`"
          mode="aspectFill"
          class="signature__img"
          @click="handlePreviewImage(`${staticUrl}${imgItem}`, directorSignatures)"
        ></image>
      </view>
      <view class="flex-td--label">吊物质量(t)及作业级别</view>
      <view class="flex-td--value flex-center"> {{ detail.weight }}吨/{{ ticket.ticketWorkLevelLabel }}吊装作业 </view>
    </view>
    <view class="flex-tr">
      <view class="flex-td--label">关联的其他特殊作业及安全作业票编号</view>
      <view class="flex-td--value flex-center">{{ relevanceTicketLabel }}</view>
    </view>
    <view class="flex-tr">
      <view class="flex-td--label">风险辨识结果</view>
      <view class="flex-td--value flex-center">{{ ticket.riskIdentificationResultLabel }}</view>
    </view>
    <view class="flex-tr">
      <view class="flex-td--label">作业实施时间</view>
      <view class="flex-td--value flex-center">{{ actualDateLabel }}</view>
    </view>
  </view>
</template>
<script>
import ticketTableMixin from './ticketTableMixin'
export default {
  mixins: [ticketTableMixin],
  props: {
    ticketId: [Number, String],
    detail: {
      type: Object,
      default: () => ({})
    },
    inspect: {
      type: Object,
      default: () => ({})
    },
    signatures: {
      type: Array,
      default: () => []
    },
    ticket: {
      type: Object,
      default: () => ({})
    },
    relevanceTicketLabel: String,
    riskIdentificationResult: String,
    actualDateLabel: String
  }
}
</script>
<style scoped lang="scss">
@import './style.scss';
</style>
